<?php
include("includes/connect.php"); 
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Hoonur.com allows you to connect with the right professionals in the entertainment industry</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div id="wrapper">
<?php 
$title="Login";
include("header.php"); 
?>
<div id="title">
	Log in to your account here
</div>
<div id="logincontent">
	<div class="leftlogincontent">
    	<div id="login">        
                <form name="login" action="loginprocess.php" method="post" id="login">
                <table border="0" cellpadding="2px" cellspacing="3px">
                    <tr><td class="formhead" colspan="2">Email Id:</td></tr>
                    <tr><td colspan="2"><input type="text" name="username" size="20" id="regtextbox"></td></tr>                
                    <tr><td class="formhead" colspan="2">Password:</td></tr>
                    <tr><td colspan="2"><input type="password" name="password" size="20" id="regtextbox"></td></tr>
                    <tr><td colspan="2"><?php if(isset($_REQUEST['er']) && $_REQUEST['er']=='2') { echo '<div style="color:#FF0000;">Incorrect username</div>'; } elseif(isset($_REQUEST['er']) && $_REQUEST['er']=='1') { echo '<div style="color:#FF0000;">Incorrect password</div>';} ?></td></tr>
                    <tr><td colspan="2"><input type="checkbox" name="ksigned">Keep me signed in</td></tr>
                    <tr><td ><input type="submit" name="Submit" class="loginbut" value=""/></td><td>Forgot password?<br />
<a href="forgot-password.php">click here</a></td></tr>
                    <tr><td id="log">Log in with</td><td><img src="images/fb.gif" /></td></tr>                    
                </table>
                </form>                
        </div>
	</div>
    <div class="rightlogincontent">
    	<div class="loginright">
    	<span>As a Free Member of Hoonur, you can:</span>
        <ul>
        	<li>Showcase your talent, portfolio, audio, video, images etc and improve your chances of selection</li>
            <li>Hire actors, writers, production staff and get hired!</li>
            <li>Promote your entertainment, television, production related business and services</li>
        </ul>
        <div style="font-size:16px;">Not a member yet, <a href="register.php">Register Now</a></div>
        </div>
	</div>
</div>
<div style="clear:both;"></div>    
<div id="add">
	<img src="images/addsense.jpg" />
</div>

<div>
<?php include("footer.php"); ?>
</div>
</div>
<?php if(isset($_SESSION['user_id']) && $_SESSION['user_id']!='') { ?>
<div id="pop">
	<div id="popup">
    	<div><strong>Hi <?php echo $_SESSION['fname']; ?>,</strong></div>
        <br /><br />
        <div style="text-align:center;">You are already logged in as<br /><strong style="color:#F00;"><?php echo $_SESSION['email_id']; ?></strong></div><br /><br />
        <hr style="width:370px;color:#ccc;"/>
        <br /><br />
        <div style="text-align:center;">Would you like to</div>
        <div style="text-align:center;"><a href="login.php">Sign in as a different user</a> | <a href="myhome.php">Go to homepage</a></div>
    </div>
</div>
<?php } ?>
</body>
</html>